package pshycomanagement

class Project {
String name
    Date startDate
    Date endDate
    String description
    String status
    
    static hasOne=[user:User]
    //static hasMany=[activity:Activity]

    static constraints = {
        name        blank:false
        startDate   blank:false, min:new Date()
        endDate     blank:false, min:startDate
        description blank:false
        status      blank:false, inList:["On time","Delayed","Finished","On Pause","Assingning","Canceled"]
    }
    String toString() {
        "Name: ${name}\nDescription: ${description}\nStart date: ${startDate} \nEnd Date: ${endDate}\nstatus: ${status }"
    }
}
